<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8"/>
    <title>Richzoo 众筹</title>
    <meta name="keywords" content=""/>
    <meta name="description" content=""/>
    <meta name="viewport" content="width=device-width"/>
    <link rel="stylesheet" href="/style/home/bootstrap.css"/>
    <link rel="stylesheet" href="/style/home/common.css"/>
    <link rel="stylesheet" href="/style/home/jquery.validator.css"/>
    <link rel="stylesheet" href="/javascript/home/webuploader/webuploader.css"/>
    <script type="text/javascript" src="/javascript/home/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="/javascript/home/bootstrap.min.js"></script>
    <script type="text/javascript" src="/javascript/home/jquery.validator.js"></script>
    <script type="text/javascript" src="/javascript/home/zh_CN.js"></script>
    <script type="text/javascript" src="/javascript/home/webuploader/webuploader.min.js"></script>
    <script type="text/javascript" src="/javascript/home/esl.js"></script>
    <!--[if lte IE 6]>
    <link rel="stylesheet" href="/style/home/bootstrap-ie6.css">
    <![endif]-->
    <!--[if lte IE 7]>
    <link rel="stylesheet" href="/style/home/ie.css">
    <![endif]-->
    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
    <script src="/javascript/home/html5.js"></script>
    <script src="/javascript/home/respond.min.js"></script>
    <![endif]-->
    <link rel="shortcut icon" href="/images/home/favicon.ico"/>
    <link rel="apple-touch-icon" href="/images/home/touchicon.png"/>
</head>
<body>
<!--header-->
<div class="top-header">
    <div class="clearfix container">
        <!-- >768 nav-->
        <div class="row hidden-xs">
            <div class="logo col-xs-3">
                <a href="/">
                    <img src="<?php echo ($config["SITE_LOGO"]); ?>" class="col-xs-12"/>
                </a>
            </div>
            <div class="wrap-nav col-xs-6">
                <ul class="clearfix" id="nav-list">
                    <li>
                        <a href="/">首页</a>
                    </li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">项目浏览<i class="icon-chevron-down">向下</i> </a>
                        <ul class="dropdown-menu" role="menu">
                            <?php if(is_array($deal_cate_list)): foreach($deal_cate_list as $key=>$vo): ?><li><a href="/list/?id=<?php echo ($vo["id"]); ?>" title="<?php echo ($vo["name"]); ?>"><?php echo ($vo["name"]); ?></a></li><?php endforeach; endif; ?>
                        </ul>
                    </li>
                    <li class="dropdown">
                        <a href="/user.html" class="dropdown-toggle" data-toggle="dropdown">我的众筹<i class="icon-chevron-down">向下</i> </a>
                        <ul class="dropdown-menu" role="menu">
                            <li><a href="/user.html">我的众筹</a></li>
                        </ul>
                    </li>
                    <li>
                        <a href="/project/add.html">发起项目</a>
                    </li>
                    <li>
                        <a href="/help/about.html">新手帮助</a>
                    </li>
                </ul>
            </div>
            <div class="user col-xs-3">
                <?php if(empty($user["user_name"])): ?><a data-toggle="modal" class="pull-right  " id="reg-btn" onclick="code('.code-reg')" data-target="#reg_dialog">注册</a>
                    <a data-toggle="modal" id="login-btn" onclick="code('.code-login')" class="pull-right mr20" data-target="#login_dialog">登录</a>
                    <?php else: ?>
                    <a href="/user/logout" class="user-name pull-right">退出</a>
                    <a href="/user.html" class="pull-right mr20"><?php echo ($user["user_name"]); ?></a>
                    <!--<div class="user-img visible-lg ">-->
                        <!--<a href="/user.html"><div class="user-img-bg"></div>-->
                            <!--<?php if(empty($user["avatar"])): ?><img src="/images/avatar/noavatar_small.gif" /><?php else: ?><img src="<?php echo ($user["avatar_small"]); ?>" /><?php endif; ?>-->
                    <!--</div>--><?php endif; ?>
            </div>
        </div>
        <!-- <768 nav-->
        <div class="row visible-xs">
            <div class="logo">
                <a href="/">
                    <img src="<?php echo ($config["SITE_LOGO"]); ?>" class="col-xs-4"/>
                </a>
            </div>
            <div class="user col-xs-4 col-xs-offset-4 text-right">
                <?php if(empty($user["user_name"])): ?><a data-toggle="modal" id="reg-btn" onclick="code('.code-reg')" data-target="#reg_dialog">注册</a>
                    <a data-toggle="modal" id="login-btn" onclick="code('.code-login')" class="ml10" data-target="#login_dialog">登录</a>
                    <?php else: ?>
                    <div class="user-img">
                        <a href="/user.html"><div class="user-img-bg"></div>
                            <?php if(empty($user["avatar"])): ?><img src="/images/avatar/noavatar_small.gif" /><?php else: ?><img src="<?php echo ($user["avatar_small"]); ?>" /><?php endif; ?>
                    </div>
                    <a href="/user.html" class="user-name"><?php echo ($user["user_name"]); ?></a><?php endif; ?>
            </div>
        </div>
        <div class="row visible-xs mt5">
            <div class="col-xs-12">
                <ul class="clearfix" id="phone-nav-list">
                    <li class="col-xs-2">
                        <a href="/">首页</a>
                    </li>
                    <li class="dropdown col-xs-3">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">项目浏览<i class="glyphicon glyphicon-chevron-down"></i> </a>
                        <ul class="dropdown-menu" role="menu">
                            <?php if(is_array($deal_cate_list)): foreach($deal_cate_list as $key=>$vo): ?><li><a href="/list/?id=<?php echo ($vo["id"]); ?>" title="<?php echo ($vo["name"]); ?>"><?php echo ($vo["name"]); ?></a></li><?php endforeach; endif; ?>
                        </ul>
                    </li>
                    <li class="col-xs-3">
                        <a href="/user.html" class="dropdown-toggle" data-toggle="dropdown">我的众筹<i class="glyphicon glyphicon-chevron-down"></i> </a>
                        <ul class="dropdown-menu" role="menu">
                            <li><a href="/user.html">我的众筹</a></li>
                        </ul>
                    </li>
                    <li class="col-xs-2">
                        <a href="/project/add.html">发起项目</a>
                    </li>
                    <li class="col-xs-2">
                        <a href="/help/list.html">新手帮助</a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</div>
<!--header end-->
<!--幻灯-->
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
    <!-- Indicators -->
    <ol class="carousel-indicators">
        <?php if(is_array($image_list)): $k = 0; $__LIST__ = $image_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($k % 2 );++$k;?><li data-target="#carousel-example-generic" data-slide-to="<?php echo ($k); ?>" <?php if(( $k == 1)): ?>class="active"<?php endif; ?>></li><?php endforeach; endif; else: echo "" ;endif; ?>
    </ol>

    <!-- Wrapper for slides -->
    <div class="carousel-inner" role="listbox">
        <?php if(is_array($index_image)): $k = 0; $__LIST__ = $index_image;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($k % 2 );++$k;?><div class="item <?php if(( $k == 1)): ?>active<?php endif; ?>">
            <a href="<?php echo ($vo["url"]); ?>" title="<?php echo ($vo["title"]); ?>">
                <div class="text-center" style="background-color: #040404">
                    <img src="<?php echo ($vo["image"]); ?>" alt="<?php echo ($vo["title"]); ?>">
                </div>
            </a>
    </div><?php endforeach; endif; else: echo "" ;endif; ?>
</div>

<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
    <span class="glyphicon glyphicon-chevron-left"></span>
    <span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
    <span class="glyphicon glyphicon-chevron-right"></span>
    <span class="sr-only">Next</span>
</a>
</div>

<div class="main-container">
    <div class="container mt20">
        <div class="content">
            <div class="row hidden-xs">
                <div class="col-xs-8">
                    <div class="clearfix mb25" >
                        <div class="btn-pre">
                        </div>
                        <div class="wrap-cou">
                            <ul class="index-menu-nav clearfix" id="deal_cate_list">
                                <!--<li class="current check-all">-->
                                <!--<div class="btn-all current"><i class="glyphicon glyphicon-chevron-down current"></i> </div>-->
                                <!--<span class="f14">全部</span>-->
                                <!--</li>-->
                                <?php if(is_array($deal_cate_list)): $i = 0; $__LIST__ = $deal_cate_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li>
                                        <a href="/list/?id=<?php echo ($vo["id"]); ?>">
                                            <img src="<?php echo ($vo["image"]); ?>"/>
                                            <span class="title"><?php echo ($vo["name"]); ?></span>
                                        </a>
                                    </li><?php endforeach; endif; else: echo "" ;endif; ?>
                            </ul>
                        </div>
                        <div class="btn-next">
                        </div>
                    </div>
                </div>
                <div class="col-xs-4" id="sel-dropdown">
                    <div class="btn-group">
                        <button type="button" class="btn btn-gray">全部</button>
                        <button type="button" class="btn dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                            <span class="caret"></span>
                            <span class="sr-only"></span>
                        </button>
                        <ul class="dropdown-menu" role="menu">
                            <li><a href="#">下拉菜单一</a></li>
                            <li><a href="#">下拉菜单一</a></li>
                            <li><a href="#">下拉菜单一</a></li>
                        </ul>
                    </div>
                    <div class="btn-group">
                        <button type="button" class="btn btn-gray">状态</button>
                        <button type="button" class="btn dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                            <span class="caret"></span>
                            <span class="sr-only"></span>
                        </button>
                        <ul class="dropdown-menu" role="menu">
                            <li><a href="#">下拉菜单一</a></li>
                            <li><a href="#">下拉菜单一</a></li>
                            <li><a href="#">下拉菜单一</a></li>
                        </ul>
                    </div>
                    <div class="btn-group">
                        <button type="button" class="btn btn-gray">最新上线</button>
                        <button type="button" class="btn dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                            <span class="caret"></span>
                            <span class="sr-only"></span>
                        </button>
                        <ul class="dropdown-menu" role="menu">
                            <li><a href="#">下拉菜单一</a></li>
                            <li><a href="#">下拉菜单一</a></li>
                            <li><a href="#">下拉菜单一</a></li>
                        </ul>
                    </div>
                </div>
            </div>
            <div id="list">
                <ul>
                    <?php if(is_array($deal_list)): $k = 0; $__LIST__ = $deal_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($k % 2 );++$k;?><li class="row">
                            <div class="hidden-xs">
                                <a href="/deal/show/?id=<?php echo ($vo["id"]); ?>"><img src="<?php echo ($vo["image"]); ?>" class="col-xs-7 title="<?php echo ($vo["name"]); ?>"/></a>
                            </div>
                            <div class="col-sm-5">
                                <div class="wrap-item">
                                    <a href="/deal/show/?id=<?php echo ($vo["id"]); ?>"><h1 class="title mb10"><?php echo ($vo["name"]); ?></h1></a>
                                    <div class="row index-data">
                                        <div class="col-xs-6 text-center">
                                            <div class="money" title="￥<?php echo ($vo["limit_price"]); ?>">￥<?php echo ($vo["limit_price"]); ?></div>
                                            <p class="t">筹集资金</p>
                                        </div>
                                        <div class="col-xs-3">
                                            <div class="wrap-pie-apr" id="pie<?php echo ($k); ?>" data-apr="<?php echo ($vo["percent"]); ?>%">
                                            </div>
                                            <p class="ti2">已筹资金</p>
                                        </div>
                                        <div class="col-xs-3">
                                            <div class="wrap-pie-day" id="pie<?php echo ($k); ?>1" data-apr="<?php echo ($vo["remain_days_percent"]); ?>%" data-day="<?php echo ($vo["remain_days"]); ?>">
                                            </div>
                                            <p class="ti2">剩余时间</p>
                                        </div>
                                    </div>
                                </div>

                            </div>
                        </li><?php endforeach; endif; else: echo "" ;endif; ?>
                </ul>
                <div class="page mt30">
                    <?php echo ($page); ?>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $(function(){
        var _li = 7;
        var _li_total = $("#deal_cate_list li").length;
        var _li_width = $("#deal_cate_list li").width();
        $(".btn-pre").on('click',function(){
            var left = $("#deal_cate_list").position().left;
            if(left == 0 || left%90 != 0){
                return false;
            }
            $("#deal_cate_list").animate({'left':left + 90 + 'px'})
        })
        $(".btn-next").on('click',function(){
            var k = _li_total - _li;//根据总li条数判断移动多少条
            var move_li = -k*_li_width;//根据li宽度判断最终移动多少px
            var left = $("#deal_cate_list").position().left;
            if(left == move_li || left%90 != 0 ){return false;}
            $("#deal_cate_list").animate({'left':left - 90 + 'px'})
        })
    })

</script>
<div class="wrap-footer">
    <div class="container footer">
        <div class="menu-nav text-center">
            <?php if(is_array($help_list)): $k = 0; $__LIST__ = $help_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($k % 2 );++$k; if(( $k != 1)): ?><span class="menu-nav-split"></span><?php endif; ?>
            <a href="<?php echo ($vo["url"]); ?>"><?php echo ($vo["title"]); ?></a><?php endforeach; endif; else: echo "" ;endif; ?>
        </div>
        <div class="back-top">
            <img src="/images/home/back_top.png"/>
        </div>
        <div class="info mb15 text-center">
            <span>网络文化经营许可证：文网文[2010]040号</span>
            <span>值电信业务经营许可证：浙B2-20080224-1</span>
            <span>信息网络传播视听节目许可证：1109364号</span>
            <span>互联网违法和不良信息举报电话：0571-81683755</span>
        </div>
        <div class="copy mb15 text-center">
            &copy;&nbsp;&nbsp;2014 RichZoo. All rights reserved. 沪ICP备14018325号 Copyright 2014 锐祁机构
        </div>
    </div>
</div>
<?php if(empty($user_info['user_name'])): ?><!--注册-->
<div class="modal fade" id="reg_dialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog" id="wrap_reg_dialog">
        <div class="modal-content">
            <button class="ui-btn ui-btn-blue btn-add-close" data-dismiss="modal"onclick="window.location.reload()">x</button>
            <h1 class="add-header">新用户注册</h1>
            <div class="add-content">
                <div class="add-content-form">
                    <form class="ui-form" id="reg-form" autocomplete="off">

                        <div class="row">
                            <label class="col-xs-2 col-xs-offset-2">邮箱：</label>
                            <div class="col-xs-4">
                                <div class="ipt">
                                    <input type="text" name="email" placeholder="填写电子邮箱">
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <label class="col-xs-2 col-xs-offset-2">手机号：</label>
                            <div class="col-xs-4">
                                <div class="ipt">
                                    <input type="text" name="mobile" placeholder="填写手机号">
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <label class="col-xs-2 col-xs-offset-2">密码：</label>
                            <div class="col-xs-4">
                                <div class="ipt">
                                    <input type="password" name="password" maxlength="16" placeholder="设置密码">
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <label class="col-xs-2 col-xs-offset-2">确认密码：</label>
                            <div class="col-xs-4">
                                <div class="ipt">
                                    <input type="password" name="re_password" maxlength="16" placeholder="输入同一密码">
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <label class="col-xs-2 col-xs-offset-2">验证码：</label>
                            <div class="col-xs-3">
                                <div class="ipt lg-code">
                                    <input type="text" name="code" placeholder="请输入图片中的数字">
                                </div>
                            </div>
                            <div class="pull-left">
                                <div class="wrap-code">
                                    <div class="text-center pt5 ml5">
                                        <img class="code-img code-reg" src="/index/verify_code"  alt="验证码">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <label class="col-xs-2 col-xs-offset-2">短信验证码：</label>
                            <div class="col-xs-3">
                                <div class="ipt lg-code">
                                    <input type="text" name="auth_code" placeholder="输入收到的验证码">
                                </div>
                            </div>
                            <a class="ui-btn ui-btn-blue btn-get-code get-code-reg">获取验证码</a>
                        </div>
                        <div class="row">
                            <label class="col-xs-2 col-xs-offset-2"></label>
                            <div class="form-radio col-xs-4">
                                <div class="ipt">
                                    <div class="col-xs-12">
                                        <span class="ui-radio check-agree"></span>
                                        阅读并同意RichZoo众筹<a href="#" class="fc-blue">《服务协议》</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="add-link text-center mt30">
                    <button class="ui-btn ui-btn-blue ui-btn-default" id="register">注册</button>
                    <p class="tips mt10 fc-red f14"></p>
                </div>
            </div>
        </div>
    </div>
</div>
<!--注册end-->
<!--login s-->
<div class="modal fade" id="login_dialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog" id="wrap_login_dialog">
        <div class="modal-content" id="login-wrap">
            <button class="ui-btn ui-btn-blue btn-add-close" data-dismiss="modal" id="login-close">x</button>
            <h1 class="add-header">用户登录</h1>
            <div class="add-content">
                <div class="add-content-form">
                    <form class="ui-form" id="login-form" autocomplete="off">
                        <div class="row">
                            <label class="col-xs-2 col-xs-offset-2">邮箱：</label>
                            <div class="col-xs-4">
                                <div class="ipt">
                                    <input type="text" name="username" id="username" placeholder="邮箱">
                                </div>
                                <div class="pl5 mt5" id="goto-reg">没有帐号？去注册</div>
                            </div>
                        </div>
                        <div class="row">
                            <label class="col-xs-2 col-xs-offset-2">登录密码：</label>
                            <div class="col-xs-4">
                                <div class="ipt">
                                    <input type="password" name="password" maxlength="16" id="pass" placeholder="输入登录密码">
                                </div>
                                <div class="pl5 mt5" id="link-forget">忘记密码？</div>
                            </div>
                        </div>
                        <div class="row">
                            <label class="col-xs-2 col-xs-offset-2">验证码：</label>
                            <div class="col-xs-3">
                                <div class="ipt lg-code">
                                    <input type="text" name="code" maxlength="4" placeholder="请输入图片中的数字">
                                </div>
                            </div>
                            <div class="pull-left">
                                <div class="wrap-code">
                                    <div class="text-center pt5 ml5">
                                        <img class="code-img code-login" src="/index/verify_code" alt="验证码">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                    <form class="ui-form" id="login-bind-form" autocomplete="off" style="display: none">
                                    <input type="hidden" name="username" id="h-user">
                                    <input type="password" style="display: none" id="h-pass" name="password" >
                        <div class="row">
                            <label class="col-xs-2 col-xs-offset-2">手机号码：</label>
                            <div class="col-xs-4">
                                <div class="ipt lg-code">
                                    <input type="text" name="mobile" id="phone"  placeholder="输入手机号码">
                                </div>
                            </div>
                            <a class="ui-btn ui-btn-blue btn-get-code get-bind-code">获取验证码</a>
                        </div>
                        <div class="row">
                            <label class="col-xs-2 col-xs-offset-2">短信验证码：</label>
                            <div class="col-xs-4">
                                <div class="ipt">
                                    <input type="text" name="code" placeholder="请填写收到验证码">
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="add-link text-center mt30 mb30" id="wrap-login">
                    <button class="ui-btn ui-btn-blue ui-btn-default" id="login-ajax">登录</button>
                    <p class="login-tips mt10 fc-red f14"></p>
                </div>
                <div class="add-link text-center mt30 mb30" id="wrap-login-bind" style="display: none">
                    <button class="ui-btn ui-btn-blue ui-btn-default" id="login-ajax-bind">绑定并登录</button>
                    <p class="login-bind-tips mt10 fc-red f14"></p>
                </div>
            </div>
        </div>
        <div class="modal-content" id="forget-wrap">
            <button class="ui-btn ui-btn-blue btn-add-close" data-dismiss="modal" onclick="window.location.reload()">x</button>
            <h1 class="add-header">找回密码</h1>
            <div class="add-content">
                <div class="add-content-form" style="padding: 40px 0 20px 0">
                    <form class="ui-form" id="forget-form" autocomplete="off">
                        <div class="row">
                            <label class="col-xs-3 col-xs-offset-2">注册邮箱：</label>
                            <div class="col-xs-4">
                                <div class="ipt">
                                    <input type="text" name="email" placeholder="注册邮箱">
                                </div>
                            </div>
                        </div>
                        <!--<div class="row">-->
                            <!--<label class="col-xs-3 col-xs-offset-2">短信验证码：</label>-->
                            <!--<div class="col-xs-3">-->
                                <!--<div class="ipt">-->
                                    <!--<input type="text" name="auth_code" placeholder="输入收到的验证码">-->
                                <!--</div>-->
                            <!--</div>-->
                            <!--<a class="ui-btn ui-btn-blue btn-get-code get-code-lost">获取验证码</a>-->
                        <!--</div>-->
                        <!--<div class="row">-->
                            <!--<label class="col-xs-3 col-xs-offset-2">新的登录密码：</label>-->
                            <!--<div class="col-xs-4">-->
                                <!--<div class="ipt">-->
                                    <!--<input type="password" name="password" placeholder="设置密码">-->
                                <!--</div>-->
                            <!--</div>-->
                        <!--</div>-->
                        <!--<div class="row">-->
                            <!--<label class="col-xs-3 col-xs-offset-2">再输入一次密码：</label>-->
                            <!--<div class="col-xs-4">-->
                                <!--<div class="ipt">-->
                                    <!--<input type="password" name="re_password" placeholder="输入同一密码">-->
                                <!--</div>-->
                            <!--</div>-->
                        <!--</div>-->
                    </form>
                </div>
                <div class="add-link text-center mt30 mb30">
                    <button class="ui-btn ui-btn-blue ui-btn-default" id="lost-ajax">提交</button>
                    <p class="lost-tips mt10 fc-red f14"></p>
                </div>
            </div>
        </div>
    </div>
</div><?php endif; ?>
<!--login e-->
<script type="text/javascript" src="/javascript/home/main.js"></script>
<?php if(($request_login == 1)): ?><script type="text/javascript">
    $('#login_dialog').modal('show');
</script><?php endif; ?>
        <script>
            $(function(){
                $("#login-close").on('click',function(){
                    var _url = window.location.href;
                    var _status=_url.indexOf('request_login');
                    if(_status == -1){
                        window.location.reload();
                    }
                })
            })
        </script>
</body>
</html>